<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<link href="js/select2/select2.min.css" type="text/css" rel="stylesheet" />
<script src="js/select2/select2.min.js"></script>
<script type="text/javascript">
	$(document).ready(function() {
		var s1=$("#roomType").select2();
		initSelectData2();
		s1.val("玄关").trigger("change");
	});
	
	function initSelectData2(){
		var html = "";
		var arr = ["玄关","起居室","餐厅","厨房","储物间","卫生间","房间","平台","阳台"];
		for(var i = 0;i<arr.length;i++){
			html = "<option value=\""+arr[i]+"\">"+arr[i]+"</option>";
			$("#roomType").append(html);
		}
	}
</script>
  <div class="main">
 		<div style="height: 34px;">
			房屋类型：<select  class="js-example-basic-single" name="roomType" id="roomType" style="width:135px;">
			</select>
			房间性质：<span>住宅</span>
			&nbsp; <a class='btn btn-success radius'  onClick=doSearch()  >查 询</a>
			&nbsp; <a id="room_btn_add"  class='btn btn-primary radius' onClick='openAddCheck(this)' >新 增</a> 
		</div>
		<div class="mt-20" style="margin-top:10px;">
			<table id="searchTable_2" width="100%">
				<tr>
					<th w_index="no" width="5%;" w_align="center">序号</th>
					<th w_index="no" width="5%;" w_align="center">房号</th>
					<th w_index="buildingInfoName" width="10%;" w_align="center">客户名称</th>
					<th w_index="checkinStatus" width="5%" w_align="center">房间性质</th>
					<th w_index="checkinStatus" width="5%" w_align="center">房间类型</th>
					<th w_index="datails" width="10%;" w_render="Data">操作</th>
					<th w_hidden="true" w_index="id" >id</th>
				</tr>
			</table>
			<script type="text/javascript">
				var gridObj_2;
				$(function () {
					var fkdeptid="";
					var projectType="";
					var sdate="";
					gridObj_2 = $.fn.bsgrid.init('searchTable_2', {
						url: "energy/energyConsumption/getEnergyConsumptionJsonData",
						autoLoad: true,
						pageSizeSelect: true, 
						multiSort: true ,
						displayBlankRows: false ,
						pagingLittleToolbar: true,
						stripeRows: true,
						rowHoverColor: true,
						pageSize: 15,
						curPage:1
					});
				});

			//新增页面
			function openAddCheck(obj){
				//$('input[type=radio][name="state"][value=1]').attr("checked",'checked');
				var roomType = $("#roomType").val();
				var url="project/roomInfo/openAddCheck?direction=东&&roomType="+roomType;
				$(obj).attr('_href',url);
				$(obj).attr('data-title',"装修验收");
				Hui_admin_tab(obj);
			}

	</script>
	
		</div>
 </div>
	
	

